#pragma once
#include "QWidgetD3D.h"
#include "FrameManage.h"
class SelfApp : public QWidgetD3D
{
public:
	SelfApp(QWidget *parent = Q_NULLPTR);
	~SelfApp();
	SelfApp& operator=(const SelfApp& rhs) = delete;
	virtual bool Initialize()override;
private:
	virtual void OnResize()override;
	virtual void Update(const GameTimer& gt)override;
	virtual void Draw(const GameTimer& gt)override;

	virtual void OnMouseDown(WPARAM btnState, int x, int y)override;
	virtual void OnMouseUp(WPARAM btnState, int x, int y)override;
	virtual void OnMouseMove(WPARAM btnState, int x, int y)override;
	virtual void StateKeyChange(int iKey, bool isDown);
protected:
	POINT mLastMousePos;
	const int gNumFrameResources = 3;
	vector<shared_ptr<FrameResourceObj>> m_vpFrameObj;
	shared_ptr<FrameResourceObj> m_pCurrFrameResource = nullptr;
	int m_iCurrFrameResourceIndex = 0;
};

